{% if supervisor_unix_http_server_enable %}
[unix_http_server]
file = {{ supervisor_unix_http_server_socket_path }}
chown = {{ supervisor_user }}
{% if supervisor_user and supervisor_password %}
username = {{ supervisor_user }}
password = {{ supervisor_password }}
{% endif %}
{% endif %}

{%- if supervisor_inet_http_server_enable %}
[inet_http_server]
port = {{ supervisor_inet_http_server_port }}
{% if supervisor_user and supervisor_password %}
username = {{ supervisor_user }}
password = {{ supervisor_password }}
{% endif %}
{% endif %}

[supervisord]
logfile={{ supervisor_log_path }}/supervisord.log   ; main log file; default $CWD/supervisord.log
logfile_maxbytes=100MB             ; max main logfile bytes b4 rotation; default 50MB
logfile_backups=10                 ; # of main logfile backups; 0 means none, default 10
loglevel=info                      ; log level; default info; others: debug,warn,trace
pidfile=/var/run/supervisord.pid   ; supervisord pidfile; default supervisord.pid
nodaemon={{ supervisor_nodaemon }} ; start in foreground if true; default false
minfds=10240                       ; min. avail startup file descriptors; default 1024
minprocs=2000                      ; min. avail process descriptors;default 200
;umask=022                         ; process file creation umask; default 022
user={{ supervisor_user }}         ; setuid to this UNIX account at startup; recommended if root
;identifier=supervisor             ; supervisord identifier, default is 'supervisor'
;directory=/tmp                    ; default is not to cd during start
;nocleanup=true                    ; don't clean up tempfiles at start; default false
;childlogdir=/tmp                  ; 'AUTO' child log dir, default $TEMP
;environment=KEY="value"           ; key value pairs to add to environment
;strip_ansi=false                  ; strip ansi escape codes in logs; def. false

[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface

[supervisorctl]
{% if supervisor_unix_http_server_enable %}
serverurl = unix://{{ supervisor_unix_http_server_socket_path }}
{% endif %}
{% if supervisor_inet_http_server_enable %}
serverurl = http://{{ supervisor_inet_http_server_port }}
{% endif %}
{% if supervisor_user and supervisor_password %}
username = {{ supervisor_user }}
password = {{ supervisor_password }}
{% endif %}

[include]
files = {{ supervisor_config_path }}/conf.d/*.ini
